import Tabs, { TabsProps } from '@/components/Tabs';
import { useIntl } from '@umijs/max';
import React from 'react';
import HistoryData from './components/HistoryData';
import RealtimeMonitor from './components/RealtimeMonitor';

const LCMonitor: React.FC = () => {
  const intl = useIntl();
  const items: TabsProps['items'] = [
    {
      key: '1',
      label: intl.formatMessage({ id: 'data.realtimeMonitor' }),
      children: <RealtimeMonitor />,
    },
    {
      key: '2',
      label: intl.formatMessage({ id: 'data.historicalData' }),
      children: <HistoryData />,
    },
  ];
  return (
    <>
      <Tabs items={items}></Tabs>
    </>
  );
};

export default LCMonitor;
